home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 February / EnigmA AMIGA RUN 34 (1999)(G.R. Edizioni)(IT)[!][issue 1999-02].iso / www / active-net / support / updates / stfax33upd.lha / Update STFax < prev    next >
Text File  |  1998-06-25  |  4KB  |  160 lines

  1. ; $VER: STFax-Update 1.3 (25.6.98)
  2. ;
  3. ; Script by Simone Tellini <wiz@pragmanet.it>
  4. ;
  5.  
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;  set initial variables
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. (set @app-name  "STFax Professional")
  11. (set OldVersion "3.2b")
  12. (set NewVersion "3.3")
  13. (set OldFile    "STFax:STFax")
  14. (set OldSize    416588)
  15. (set PatchFile  "STFax.patch")
  16. (set @error-msg "An unexpected error has occured. Installation aborted.")
  17.  
  18. (if (= (exists OldFile (noreq)) 0)
  19.     (if (= (exists (cat OldFile ".old") (noreq)) 0)
  20.         (abort @app-name OldVersion " has not been found!")
  21.         (set OldFile (cat OldFile ".old"))
  22.     )
  23. )
  24.  
  25. (if (<> (getsize OldFile) OldSize)
  26.     (abort @app-name " has a different size than the expected one, "
  27.            "patch can't be applied.")
  28. )
  29.  
  30. (complete 0)
  31.  
  32. (welcome)
  33.  
  34. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. ;  Patch the file
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37.  
  38. (if (<> OldFile "STFax:STFax.old")
  39.   (
  40.     (if (exists "STFax:STFax.old")
  41.         (delete "STFax:STFax.old")
  42.     )
  43.  
  44.     (rename OldFile "STFax:STFax.old")
  45.  
  46.     (set OldFile (cat OldFile ".old"))
  47.   )
  48. )
  49.  
  50. (complete 20)
  51.  
  52. (working "Applying the patch...")
  53.  
  54. (run (cat "Patch " OldFile " STFax:STFax " PatchFile)
  55.     (prompt "Applying the patch...")
  56. )
  57.  
  58. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  59. ;  Copy docs, if they exists
  60. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  61.  
  62. (if (exists "STFax.guide")
  63.     (copyfiles
  64.         (source "STFax.guide")
  65.         (dest "STFax:")
  66.     )
  67. )
  68.  
  69. (complete 35)
  70.  
  71. (if (exists "History.txt")
  72.     (copyfiles
  73.         (source "History.txt")
  74.         (dest "STFax:")
  75.     )
  76. )
  77.  
  78. (complete 40)
  79.  
  80. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  81. ;  Copy modem init strings
  82. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  83.  
  84. (if (exists "Data/ModemInit.cfg")
  85.     (copyfiles
  86.         (source "Data/ModemInit.cfg")
  87.         (dest "STFax:Data")
  88.     )
  89. )
  90.  
  91. (complete 45)
  92.  
  93. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  94. ;  Install new catalogs
  95. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  96.  
  97. (if (exists "Catalogs")
  98.     (copyfiles
  99.         (prompt "Updating catalog files")
  100.         (help @copyfiles-help)
  101.         (source "Catalogs")
  102.         (dest "STFax:Catalogs")
  103.         (choices "italiano")
  104.         (confirm)
  105.     )
  106. )
  107.  
  108. (complete 60)
  109.  
  110. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  111. ;  Copy Textinput.mcc
  112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  113.  
  114. (if (exists "MUI/Textinput.mcc")
  115.  
  116.     (copylib
  117.            (prompt "Installing updated MUI classes... (Textinput.mcc)")
  118.            (help   "This will install some MUI classes needed by STFax")
  119.            (source "MUI/Textinput.mcc")
  120.            (dest   "MUI:Libs/MUI")
  121.            (confirm)
  122.     )
  123.  
  124.     (complete 70)
  125.  
  126.     (copylib
  127.            (prompt "Installing updated MUI classes... (Textinput.mcp)")
  128.            (help   "This will install some MUI classes needed by STFax")
  129.            (source "MUI/Textinput.mcp")
  130.            (dest   "MUI:Libs/MUI")
  131.            (confirm)
  132.     )
  133.  
  134.     (complete 85)
  135.  
  136.     (copylib
  137.            (prompt "Installing updated MUI classes... (Textinputscroll.mcc)")
  138.            (help   "This will install some MUI classes needed by STFax")
  139.            (source "MUI/Textinputscroll.mcc")
  140.            (dest   "MUI:Libs/MUI")
  141.            (confirm)
  142.     )
  143. )
  144.  
  145. (complete 90)
  146.  
  147. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  148. ;  End
  149. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  150.  
  151. (message @app-name " has been upgraded from version " OldVersion " to " NewVersion
  152.          "\n\nThe old STFax version has been renamed as STFax:STFax.old")
  153.  
  154. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  155. ;  All done.
  156. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  157.  
  158. (complete 100)
  159.  
  160.